home *** CD-ROM | disk | FTP | other *** search
/ Holt Researcher: American History / Holt Researcher: American History.iso / pc / modules / dbmap.dxr / 00003_Max Min Layout Screen.ls < prev    next >
Encoding:
Text File  |  2000-01-27  |  1.3 KB  |  54 lines

  1. global gDBPictObjList
  2.  
  3. on ResizeLayOutScreen
  4.   if the width of sprite 1 = 640 then
  5.     size = 1
  6.   else
  7.     size = 2
  8.   end if
  9.   SizeWindowArt(size)
  10.   SizeMIAW(size)
  11.   updateStage()
  12. end
  13.  
  14. on SizeWindowArt size
  15.   MyObj = getaProp(gDBPictObjList, GetObjProp())
  16.   SetPuppetState([1, 3], #c, 1)
  17.   BorderRect = GetBorderRect(MyObj, size)
  18.   set the rect of sprite 1 to BorderRect
  19.   set the rect of sprite 2 to BorderRect + rect(1, 1, -1, -1)
  20.   xMemberNum = the number of member getAt(["doc min", "doc max"], size)
  21.   set the member of sprite 3 to member(xMemberNum)
  22.   set the rect of sprite 3 to rect(0, 0, member(xMemberNum).width, member(xMemberNum).height)
  23.   SpriteList = GetSpriteList(MyObj)
  24.   ButtonList = GetButtonList(MyObj)
  25.   repeat with rc in ButtonList
  26.     buttonLoc(rc, size)
  27.   end repeat
  28. end
  29.  
  30. on SizeMIAW size
  31.   if count(the windowList) > 0 then
  32.     MyObj = getaProp(gDBPictObjList, GetObjProp())
  33.     windowName = (the activeWindow).name
  34.     MyRect = window(windowName).rect
  35.     if size = 1 then
  36.       l = getAt(MyRect, 1)
  37.       t = getAt(MyRect, 2)
  38.     else
  39.       l = getAt((the stage).rect, 1)
  40.       t = getAt((the stage).rect, 2) + 26
  41.     end if
  42.     window(windowName).rect = GetBorderRect(MyObj, size) + rect(l, t, l, t)
  43.   end if
  44. end
  45.  
  46. on GetSize
  47.   if the width of sprite 1 < 640 then
  48.     size = 1
  49.   else
  50.     size = 2
  51.   end if
  52.   return size
  53. end
  54.